<!doctype html>
<html>
<head>
	<!--
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/main.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/mine.css') }}">

<script src="{{ url_for('static',filename='js/jquery-1.12.4.js') }}"></script>
<script src="{{ url_for('static',filename='js/jquery-ui.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/main.js') }}"></script>
-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/main.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/mine.css') }}">

<script src="{{ url_for('static',filename='js/jquery-1.12.4.js') }}"></script>
<script src="{{ url_for('static',filename='js/jquery-ui.min.js') }}"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

<script src="{{ url_for('static',filename='js/main.js') }}"></script>
</head>

<style type="text/css">
	h1{
		text-align:center}
	table{
		margin:0 auto;
		width:100%;
		border:2px solid rgba(202, 223, 238, 0.87);
		border-collapse:collapse}
	table th,table td{
		border:2px solid rgba(202, 223, 238, 0.87);
		padding:5px;
		
		}
	th{
		background-color:rgba(202, 223, 238, 0.87);}
</style>

<body>
	<div class="alldiv">
			<div class="left_navigation" id="left_nav">
				
			</div>
			<script>
				$(left_nav).load('/Public/leftNav')
			</script>

            <div class="righthtml" >

                <img src="{{ url_for('static',filename='image/banner.png') }}" width="100%" height="200">
                <div class="mine_center_left">
                    <caption><center><h2>basic information</h2></center></caption>
                        <div class="center_left_bottom">
                            <div style="margin-top:50px"  class="col-lg-5">
                                <div class="input-group">
                                    <span class="input-group-addon">sbp</span> <!--140-->
                                    <input readonly="readonly" type="test" class="form-control" aria-label="..." id ='sbp'>
                                    </div><!-- /input-group -->
                            </div>
                            <div style="margin-top:50px" class="col-lg-5">
                                <div class="input-group">
                                    <span class="input-group-addon">dbp</span> <!--140-->
                                    <input readonly="readonly" type="test" class="form-control" aria-label="..." id ='dbp'>
                                    </div><!-- /input-group -->
                            </div>
                            <div style="margin-top:50px" class="col-lg-5">
                                <div class="input-group">
                                    <span class="input-group-addon">glucose</span> <!--140-->
                                    <input readonly="readonly" type="test" class="form-control" aria-label="..." id ='glucose'>
                                    </div><!-- /input-group -->
                            </div>
                            <div style="margin-top:50px" class="col-lg-5">
                                <div class="input-group">
                                    <span class="input-group-addon">cholesterol</span> <!--140-->
                                    <input readonly="readonly" type="test" class="form-control" aria-label="..." id ='cholesterol'>
                                    </div><!-- /input-group -->
                            </div>
                            <div style="margin-top:50px" class="col-lg-5">
                                <div class="input-group">
                                    <span class="input-group-addon">sao2</span> <!--140-->
                                    <input readonly="readonly" type="test" class="form-control" aria-label="..." id ='sao2'>
                                    </div><!-- /input-group -->
                                    <div style="margin-top:50px;margin-left:200px"><a href="/Search/">back</a></div>
                            </div>
                            
                        </div>
                        
                </div>
            </div>
    </div>
</body>
<script>
    $(document).ready(function(){
        queryInfo();
        }); 
    function queryInfo(){
        var loc = location.href;
        
        var n1 = loc.length;
        var n2 = loc.indexOf('=');
        var id = decodeURI(loc.substr(n2+1,n1-n2));
        $.ajax({
            url: "/Search/queryDetail", 
            type: "POST",  
            async: false,
            data:{
                'id' : id
            },
            success: function (result) {
                if (result.message == "success!") {
                       $("#sbp").val(result.dbdata[0][1])
                       $("#dbp").val(result.dbdata[0][2])
                       $("#glucose").val(result.dbdata[0][3])
                       $("#cholesterol").val(result.dbdata[0][4])
                       $("#sao2").val(result.dbdata[0][5])
                }
                else {
                    alert(result.message)
                }
            }
        });
    }
</script>
</html>